GXCopyToTransform
You can use theGXCopyToTransform
function to create a copy of an existing transform object.
gxTransform GXCopyToTransform (gxTransform target, gxTransform source);
target
- A reference to the transform object to copy the source contents into. If you specify
nil
for this parameter, theGXCopyToTransform
function creates a new transform object.source
- A reference to the transform object whose contents you want to copy.
DESCRIPTION
TheGXCopyToTransform
function copies the contents of an existing transform object to another, or it creates a new transform object and copies the contents of an existing transform object to it. The function copies the clip, mapping, hit-test parameters, tag list and view port list (but not the owner count) of the source transform object into the target transform object. It clones, but does not copy, the tag objects in the tag list.If you specify
nil
for thetarget
parameter, theGXCopyToTransform
function creates a new transform object and copies the properties of the source transform, including the tag list, to the new transform.You can use this function to create a copy of a transform object and then modify it without changing the original.
SPECIAL CONSIDERATIONS
If you specifynil
for thetarget
parameter and no error occurs, theGXCopyToTransform
function creates a transform object; you are responsible for disposing of that object when you no longer need it.ERRORS, WARNINGS, AND NOTICES
Errors out_of_memory transform_is_nil SEE ALSO
For an example of the use of this function, see page 6-17.To create a new transform object with default values, use the
GXNewTransform
function, described on page 6-33.To compare transform objects for equality, use the
GXEqualTransform
function, described in the next section.